<!--
 * @Author: your name
 * @Date: 2020-09-23 09:29:18
 * @LastEditTime: 2020-09-28 15:56:01
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /Project/index.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>node.js编写接口</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
    <button type="button" onclick="onlick()">点我!</button>
    
</body>
<script>

    function onlick() {
        $.post('http://localhost:8080e/api/gtUserList',
    {
        name:"kobe",
    },
    function(data,status){
        alert("数据: \n" + data + "\n状态: " + status);
    });
        
    }

</script>
</html>